{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "\n",
    "x = [\"1980年\", \"1985年\", \"1990年\", \"1995年\"]\n",
    "y = [1000, 3000, 4000, 5000]\n",
    "plt.bar(x, y, width=0.5, color=\"blue\", align=\"center\")\n",
    "plt.rcParams[\"font.sans-serif\"] = [\"SimHei\"]  # 用来正常显示中文标签\n",
    "plt.xticks(x)\n",
    "plt.xlabel(\"年份\")\n",
    "plt.ylabel(\"销量\")\n",
    "plt.title(\"根据年份销量对比图\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# 创建一个包含两个子图的图形，1行2列\n",
    "fig, axs = plt.subplots(1, 2, figsize=(10, 5))\n",
    "\n",
    "# 第一个子图\n",
    "axs[0].plot([1, 2, 3], [1, 4, 9])\n",
    "axs[0].set_title(\"Line Plot 1\")\n",
    "\n",
    "# 第二个子图\n",
    "axs[1].bar([\"A\", \"B\", \"C\"], [10, 20, 30])\n",
    "axs[1].set_title(\"Bar Chart\")\n",
    "\n",
    "# 显示图形\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0, 7, 14, 21, 28]\n",
      "[[0, 1, 2, 3, 4, 5], [7, 8, 9, 10, 11, 12], [14, 15, 16, 17, 18, 19], [21, 22, 23, 24, 25, 26], [28, 29, 30, 31, 32, 33]]\n"
     ]
    }
   ],
   "source": [
    "labels = [\"公安\", \"信访\", \"劳动仲裁\", \"劳动监察\", \"法院\"]\n",
    "months = [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\"]\n",
    "n_months = len(months)\n",
    "x1 = [a * (n_months + 1) for a in range(len(labels))]\n",
    "print(x1)\n",
    "x = []\n",
    "for i in x1:\n",
    "    b = [i + a for a in range(n_months)]\n",
    "    x.append(b)\n",
    "\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0. 0. 0. 0. 0.]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "bottom = np.zeros(5)\n",
    "print(bottom)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[(81, 26, 108), (81, 25, 106), (76, 25, 93), (77, 26, 86), (138, 86, 91), (163, 66, 56), (124, 93, 108)]\n",
      "[740, 347, 648]\n"
     ]
    }
   ],
   "source": [
    "data = [\n",
    "    [81, 81, 76, 77, 138, 163, 124],  # 凌水\n",
    "    [26, 25, 25, 26, 86, 66, 93],  # 龙王塘\n",
    "    [108, 106, 93, 86, 91, 56, 108],  # 七贤岭\n",
    "]\n",
    "stacked_data = zip(*data)\n",
    "print(list(stacked_data))\n",
    "sum_y = [sum(x) for x in data]\n",
    "print(sum_y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "x = np.arange(5)\n",
    "x_tick = [\"a\", \"b\", \"c\", \"d\", \"e\"]\n",
    "x_tick2 = [\"A\", \"B\", \"C\", \"D\", \"E\"]\n",
    "y1 = np.array([81, 81, 76, 77, 138])\n",
    "y2 = np.array([26, 25, 25, 26, 86])\n",
    "\n",
    "bar_width = 0.1\n",
    "plt.bar(x, y1, tick_label=x_tick, width=bar_width)\n",
    "plt.bar(x + bar_width, y2, tick_label=x_tick2, width=bar_width)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "x = np.arange(10, 210, 10)\n",
    "print(x)\n",
    "y = np.random.randn(100)\n",
    "print(y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAi8AAAGdCAYAAADaPpOnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAen0lEQVR4nO3df2yV9f338deRwqHNtz0Gznp6Gk9p2Xe0vcE5KJuUDAGJleK4NyUGYkTYhA0RvaE3cSkkii7a6I2scSiMTSwOTfijYvQLKk2kxYWy0V/zR0qFBWwHPdYSPYcC3xbw3H8QTr7HltK6Xpzzrs9HckWu63yunncTk/PMda7T44pEIhEBAAAYcUO8BwAAABgM4gUAAJhCvAAAAFOIFwAAYArxAgAATCFeAACAKcQLAAAwhXgBAACmJMV7gKH29ddf69SpU0pNTZXL5Yr3OAAAYAAikYjOnDmjzMxM3XBD/9dWhl28nDp1SoFAIN5jAACAb6GtrU033XRTv2uGXbykpqZKuvzLp6WlxXkaAAAwEOFwWIFAIPo63p9hFy9X3ipKS0sjXgAAMGYgt3xwwy4AADCFeAEAAKYQLwAAwBTiBQAAmEK8AAAAU4gXAABgCvECAABMIV4AAIApjsZLWVmZfvzjHys1NVXp6en6xS9+oZaWlmueV1NTo4KCAo0ePVrjx4/X1q1bnRwTAAAY4mi81NTU6OGHH9ahQ4dUVVWlixcvqqioSGfPnr3qOcePH9e8efM0Y8YMNTY2at26dXr00UdVWVnp5KgAAMAIVyQSiVyvJ/viiy+Unp6umpoa3XbbbX2u+e1vf6u33npLzc3N0WMrVqzQP/7xD9XW1l7zOcLhsDwej0KhEF8PAACAEYN5/b6u97yEQiFJ0pgxY666pra2VkVFRTHH7rzzTtXV1enChQu91nd3d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u3bp9TUVKdGBdCHc+fO6ciRI/EeI0Zzc3PMfxNNXl6eUlJS4j0GMOy5Iv+zJIaBcDgsj8ejUCiktLS0eI8DmNXQ0KCCgoJ4j2FKfX29pkyZEu8xAJMG8/rt2JUXALbl5eWpvr4+3mPEOH/+vE6cOKHs7GwlJyfHe5xe8vLy4j0C8J3AlRcAABB3g3n95lulAQCAKcQLAAAwhXgBAACmEC8AAMAU4gUAAJhCvAAAAFOIFwAAYArxAgAATCFeAACAKcQLAAAwhXgBAACmEC8AAMAU4gUAAJiSFO8BhtqVL8kOh8NxngQAAAzUldftK6/j/Rl28XLmzBlJUiAQiPMkAABgsM6cOSOPx9PvGldkIIljyNdff61Tp04pNTVVLpcr3uMAGELhcFiBQEBtbW1KS0uL9zgAhlAkEtGZM2eUmZmpG27o/66WYRcvAIavcDgsj8ejUChEvADfYdywCwAATCFeAACAKcQLADPcbreeeOIJud3ueI8CII645wUAAJjClRcAAGAK8QIAAEwhXgAAgCnECwAAMIV4AWDCgQMHNH/+fGVmZsrlcunNN9+M90gA4oR4AWDC2bNndcstt2jz5s3xHgVAnA27L2YEMDwVFxeruLg43mMASABceQEAAKYQLwAAwBTiBQAAmEK8AAAAU4gXAABgCp82AmBCV1eXjh07Ft0/fvy4mpqaNGbMGGVlZcVxMgDXG98qDcCE6upqzZ49u9fxJUuWqKKi4voPBCBuiBcAAGAK97wAAABTiBcAAGAK8QIAAEwhXgAAgCnECwAAMIV4AQAAphAvAADAFOIFAACYQrwAAABTiBcAAGAK8QIAAEwhXgAAgCn/H2Yd3eyEWReDAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "data = np.random.randn(100)\n",
    "\n",
    "print(type(data))\n",
    "print(data)\n",
    "\n",
    "\n",
    "plt.boxplot(data, widths=0.3, patch_artist=True)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[215, 212, 194, 189, 315, 285, 325]\n",
      "1735\n",
      "[215, 212, 194, 189, 315, 285, 325, 1735]\n",
      "[[81, 81, 76, 77, 138, 163, 124, 740], [108, 106, 93, 86, 91, 56, 108, 648], [26, 25, 25, 26, 86, 66, 93, 347]]\n",
      "[[81, 81, 76, 77, 138, 163, 124, 740], [108, 106, 93, 86, 91, 56, 108, 648], [26, 25, 25, 26, 86, 66, 93, 347], [215, 212, 194, 189, 315, 285, 325, 1735]]\n"
     ]
    }
   ],
   "source": [
    "data = [\n",
    "    [81, 81, 76, 77, 138, 163, 124],  # 凌水\n",
    "    [108, 106, 93, 86, 91, 56, 108],  # 七贤岭\n",
    "    [26, 25, 25, 26, 86, 66, 93],  # 龙王塘\n",
    "]\n",
    "month_sum = [sum(x) for x in zip(*data)]\n",
    "print(month_sum)\n",
    "month_sum_all = sum(month_sum)\n",
    "print(month_sum_all)\n",
    "month_sum.append(month_sum_all)\n",
    "print(month_sum)\n",
    "\n",
    "for i in data:\n",
    "    i.append(sum(i))\n",
    "print(data)\n",
    "data.append(month_sum)\n",
    "print(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "plt.colormaps()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
